package com.bishi;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        int num = -1;
        System.out.println(getNum(num));
    }

    public static int getNum(int n) {
        int count = 0;
        while (n != 0) {
            if ((n & 1) == 1) {
                count++;
            }
            n >>>= 1;
        }
        return count;
    }
}
